<ol class="breadcrumb">
    <li><a href="{:url('/user')}">首页</a></li>
    <li><a href="{:url('post/index')}">文章列表</a></li>
    <li class="active">编辑文章</li>
</ol>
<form action="{:url('do_update')}" class="form-horizontal" method="post">
    <input type="hidden" name="post_id" value="{$post.post_id}">
    <div class="form-group">
        <label for="title" class="col-md-1 control-label">标题</label>
        <div class="col-md-4">
            <input type="text" class="form-control" id="title" name="title" maxlength="100" value="{$post.title}" required>
        </div>
    </div>
    <div class="form-group">
        <label for="category_id" class="col-md-1 control-label">分类</label>
        <div class="col-md-4">
            <select name="category_id" id="category_id" class="form-control">
                <volist name="categories" id="category">
                    <option value="{$category.category_id}"
                    <eq name="post.category_id" value="$category.category_id">selected</eq>
                    >
                    {$category.name}</option>
                </volist>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-1 control-label">状态</label>
        <div class="col-md-4">
            <label class="radio-inline">
                <input type="radio" name="status" value="1"
                <eq name="post.status" value="1">checked</eq>
                > 草稿
            </label>
            <label class="radio-inline">
                <input type="radio" name="status" value="2"
                <eq name="post.status" value="2">checked</eq>
                > 显示
            </label>
            <label class="radio-inline">
                <input type="radio" name="status" value="3"
                <eq name="post.status" value="3">checked</eq>
                > 隐藏
            </label>
        </div>
    </div>
    <div class="form-group">
        <label for="sort" class="col-md-1 control-label">排序</label>
        <div class="col-md-4">
            <input type="text" class="form-control" id="sort" name="sort" value="{$post.sort}" required>
        </div>
    </div>
    <div class="form-group">
        <label for="content" class="col-md-1 control-label">内容</label>
        <div class="col-md-4">
            <textarea name="content" id="content" class="form-control" rows="10" required>{$post.content}</textarea>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-4 col-md-offset-1">
            <button class="btn btn-primary">提交</button>
            <button class="btn btn-default" type="reset">重置</button>
        </div>
    </div>
</form>